package com.yx.changdao.common.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yx.changdao.common.entity.Problem;
import com.yx.changdao.common.entity.ProblemApply;
import com.yx.changdao.common.vo.ApplyProblemVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import com.yx.changdao.common.cache.MybatisRedisCache;
import org.apache.ibatis.annotations.CacheNamespace;

import java.util.List;

/**
 * @Description: <br/>
 * 问题申请记录
 * <p>
 * <br/>
 * @Auther: wangzd
 * @create 2020/04/03 16:51
 */
@Repository
//@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface ProblemApplyMapper extends BaseMapper<ProblemApply> {

    @Select("select * from apply_problem ${ew.customSqlSegment}")
    IPage<ApplyProblemVO> pageNex(IPage<ApplyProblemVO> page,
                                  @Param(Constants.WRAPPER) QueryWrapper<ApplyProblemVO> queryWrapper);

    @Select("select * from apply_problem where id = #{applyId}")
    ApplyProblemVO byId(@Param("applyId")Integer applyId);

}
